﻿<UserControl xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  x:Class="UploadingControl.NewListPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="404" d:DesignWidth="566" xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" xmlns:my="clr-namespace:UploadingControl">

    <Grid x:Name="LayoutRoot" Background="White">

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="36"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>

            <StackPanel Orientation="Horizontal" Margin="0,12,0,0" Name="stackPanel1">
                <controls:DatePicker Name="datePicker1" Width="170" />
            </StackPanel>

            <StackPanel Orientation="Horizontal" Grid.Column="2" Margin="0,12,0,0" HorizontalAlignment="Right">
                <Button Content="Refresh" Height="23" Name="btnRefresh" Width="75" Click="btnRefresh_Click"  Margin="10,0,0,0" />
                <Button Content="Add" Height="23" Name="button2" Width="75" Click="button2_Click" Margin="10,0,0,0" />
                <Button Content="Search" Height="23" Name="button3" Width="75" HorizontalAlignment="Left" Click="button3_Click" Margin="10,0,0,0" />
            </StackPanel>

            <my:BusyIndicator HorizontalAlignment="Left" x:Name="busyIndicator1" VerticalAlignment="Top" />
            <StackPanel Orientation="Vertical" Grid.Row="1" Grid.ColumnSpan="2"  HorizontalAlignment="Stretch" >
                <StackPanel x:Name="stackPanelPager" Orientation="Horizontal"  Height="30" VerticalAlignment="Top" d:LayoutOverrides="Height" HorizontalAlignment="Right"/>
                <data:DataGrid x:Name="dataGrid1" VerticalContentAlignment="Stretch" VerticalAlignment="Stretch" AutoGenerateColumns="False" Margin="0,10,0,0" IsReadOnly="True" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" AlternatingRowBackground="#FFE4EFF4" LoadingRow="dataGrid1_LoadingRow">
                    <data:DataGrid.Columns>
                        <data:DataGridTextColumn Binding="{Binding Path=CurrentDate}" CanUserReorder="False" CanUserResize="False" CanUserSort="False" Header="News date" IsReadOnly="True" Width="150" />

                        <data:DataGridTemplateColumn CanUserReorder="False" CanUserResize="False" CanUserSort="False" Header="Action" IsReadOnly="False" Width="190" >
                            <data:DataGridTemplateColumn.CellTemplate >
                                <DataTemplate >
                                    <StackPanel Orientation="Horizontal">
                                        <HyperlinkButton Name="hbtnView" Content="View" Click="hbtnView_Click"  ></HyperlinkButton>
                                        <HyperlinkButton Name="hbtnEdit" Content="Edit" Click="hbtnEdit_Click" ></HyperlinkButton>
                                        <HyperlinkButton Name="hbtnPreview" Content="Preview" Click="hbtnPreview_Click" ></HyperlinkButton>
                                        <HyperlinkButton Name="hbtnActivate" Content="Activate" Click="hbtnActivate_Click" ></HyperlinkButton>
                                    </StackPanel>
                                </DataTemplate>
                            </data:DataGridTemplateColumn.CellTemplate>
                        </data:DataGridTemplateColumn>
                    </data:DataGrid.Columns>
                </data:DataGrid>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
